<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="sketch.css">
    <title>Document</title>
</head>

<body>
    <div class="canvas"></div>

    <script>
        var canvas = document.getElementsByClassName('canvas')[0]


        canvas.onmousemove = (e) => {
            let div = document.createElement('div')
            div.style.height = '10px';
            div.style.width = '10px'
            div.style.backgroundColor = 'red';
            div.style.position = 'absolute'
            div.style.left = e.clientX + 'px'
            div.style.top = e.clientY + 'px'
            div.style.borderRadius = '50%'

            canvas.appendChild(div);
        }
    </script>
</body>

</html>